package openrr.map;

import java.util.ArrayList;

import openrr.geom.TextureGroup;

public class TileSet {
	private ArrayList<TextureGroup> groups;
	private ArrayList<String> types;
	
	public String type;
	
	public TileSet(String type)
	{
		this.type = type;
		this.groups = new ArrayList<TextureGroup>();
		this.types = new ArrayList<String>();
	}
	public void addTexture(TextureGroup group, String type)
	{
		this.groups.add(group);
		this.types.add(type);
	}
	public TextureGroup getTextureGroupByType(String type)
	{
		for(int i = 0; i < this.types.size(); i++)
		{
			if(type.equals(this.types.get(i)))
			{
				return this.groups.get(i);
			}
		}
		return null;
	}
}
